<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>箭头函数</title>
</head>
<body>

</body>
<script>

  function foo1(){
      console.log("这是一个es5时代的函数");
  }

  const foo2 =function (){
      console.log("这是一个函数变量");
  }


  //foo2();

  /**
   *   this 失效 ?
   * */
  const foo3 = ()=>{
      console.log("这是一个箭头函数！");
  }


  const foo4=()=>alert('hello');
  foo4();


 /* function person(name){
      this.name = name;

      this.show =function (){
          alert(this.name);
      }
  }

  let person1 =new person('Matt');
  person1.show();*/





</script>
</html>